import i18n from '@/locales/index' 
const { t } = i18n.global

export const processRule = {
  section: [{ required: true, message: t('basicData.pleaseSelectSection') }],
  sortField: [{ required: true, message: t('basicData.pleaseInputSortNo') }, { pattern: /(^[0-9]([0-9]+)?$)/, message: t('other.intOnly')}],
  processNo: [{ required: true, message: t('basicData.pleaseInputProcessNo') }, { pattern: /(^[0-9]([0-9]+)?$)/, message: t('other.intOnly')}],
  name: [{ required: true, message: t('basicData.pleaseInputProcessName') }],
  processCode: [{ required: true, message: t('basicData.pleaseInputProcessCodes') }],
  professionId: [{ required: true, message: t('basicData.pleaseInputWorkName') }],
  standardSeconds: [{ required: true, message: t('other.pleaseInputStandardWorkTime') },{ pattern: /^\d{1,5}(\.\d{1,8})?$/, message: t('components.ruleFiveEightNumber') }],
  labourCost: [{ pattern: /^\d{1,5}(\.\d{1,8})?$/, message: t('components.ruleFiveEightNumber') }]
}
export const listHeaders =  [ t('basicData.section'), t('basicData.sortNo'), t('basicData.processNo'), t('basicData.processNames'), t('basicData.processCodes'), t('basicData.standardTimeSec'), t('basicData.priceYuan'), t('hangManage.artGuideIns'), t('hangManage.imgVideo'), t('basicData.workName'),'最低技能等级']

export const addList = [
{
  sortField: 1,
  section: t('components.dg'),
  processNo: "0",
  name: t('hangManage.hang'),
  processCode: "0",
  standardSeconds: 0,
  labourCost: 0
}] 